package com.boyunv.iterator.example01;
/*
 *@description
 *
 *@author boyunv
 *@create 2023/8/31 7:51
 *@version 1.0
 */

import java.util.ArrayList;

public class tet {
    public static void main(String[] args) {
        ArrayList<String> names=new ArrayList<>();
        names.add("lisi");
        names.add("zs");
        names.add("ww");
        names.add("zz");
        
        Iterator<String> iterator=new ConcreteIterator<>(names);
        while (iterator.hasNext()){
            System.out.println(iterator.currentItem());
            
            iterator.next();
        }
        
    }
}
